package BtoB.util;



public class WholeSaler implements Comparable<WholeSaler>{
	private String name;
	private String url;
	private double price;
	
	/**
	 * @param name
	 * @param url
	 * @param price
	 */
	public WholeSaler(String name, String url, double price) {
		super();
		this.name = name;
		this.url = url;
		this.price = price;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}
	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}
	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}
	
	@Override
	public int compareTo(WholeSaler o) {
		int result;
		if(this.price > o.price){
			result = 1;
		}
		else if(this.price < o.price){
			result = -1;
		}
		else{
			result = 0;
		}
		return result;
	}
	
}
